﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Reports/Report.Master" AutoEventWireup="true" CodeBehind="HttpRequetFrames.aspx.cs" Inherits="NPMonitor.Web.Reports.HttpRequetFrames" %>
<%@ Register src="/UserControls/Report.ascx" tagname="Report" tagprefix="uc1" %>
<%@ Register src="/UserControls/ReportTimePicker.ascx" tagname="ReportTimePicker" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="divSearchCondition">
    <div id="divTopBar"></div>
    <dl>
        <dd>
            <uc2:ReportTimePicker ID="ucTimePicker" runat="server" />
        </dd>
        <dd>
            <label>Location</label>
            <asp:DropDownList ID="ddlLocation" runat="server" ></asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfvLocation" ControlToValidate="ddlLocation" ForeColor="Red" runat="server" ErrorMessage=""></asp:RequiredFieldValidator>
        </dd>
        <dd>
            <label>Job</label>
            <asp:DropDownList ID="ddlJob" runat="server" ></asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfvJob" ControlToValidate="ddlJob" runat="server" ForeColor="Red" ErrorMessage=""></asp:RequiredFieldValidator>
            
        </dd>
        <dd>
            <label>Scenario</label> 
            <asp:DropDownList ID="ddlSenario" runat="server"></asp:DropDownList>
            <asp:HiddenField ID="hfScenarioNO" runat="server" />
            <asp:CustomValidator ID="cvScenarioNO" runat="server" ValidateEmptyText="true" ErrorMessage="*" ForeColor="Red" Font-Italic="true" ControlToValidate="ddlSenario" ClientValidationFunction="CheckScenario"></asp:CustomValidator>
        </dd>
        <dd>
            <asp:Button ID="btnViewReport" runat="server" Text="View Report" CssClass="blueBTN" OnClick="btnViewReport_Click"  />
        </dd>
    </dl>
    </div>
    <div>
        <uc1:Report ID="ucReport" runat="server" />
    </div>
    <div class="divReportTable">
        <asp:PlaceHolder ID="phTable" runat="server"></asp:PlaceHolder>
    </div>
    <script type="text/javascript">
        var ddlLocation = $("#<%=ddlLocation.ClientID %>");
        var ddlJob = $("#<%=ddlJob.ClientID %>");
        var ddlSenario = $("#<%=ddlSenario.ClientID %>");
        var hfScenarioNO = $("#<%=hfScenarioNO.ClientID %>");
        $(function () {
            SetReportType("Daily");

            ddlJob.change(function () {
                InitScenarioList(ddlSenario, ddlJob.children("option[selected]").val());
            });
            ddlSenario.change(function () { 
                hfScenarioNO.val(ddlSenario.children("option[selected]").val());
            });
        });
    </script>
</asp:Content>
